3.22 \(\int x (d+i c d x)^3 (a+b \tan ^{-1}(c x)) \, dx\)

Optimal. Leaf size=157 \[ -\frac{d^3 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}+\frac{d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c^2}+\frac{i b d^3 (-c x+i)^4}{20 c^2}-\frac{b d^3 (-c x+i)^3}{20 c^2}-\frac{3 i b d^3 (-c x+i)^2}{20 c^2}+\frac{6 i b d^3 \log (c x+i)}{5 c^2}-\frac{3 b d^3 x}{5 c} \]

[Out]

(-3*b*d^3*x)/(5*c) - (((3*I)/20)*b*d^3*(I - c*x)^2)/c^2 - (b*d^3*(I - c*x)^3)/(20*c^2) + ((I/20)*b*d^3*(I - c*
x)^4)/c^2 + (d^3*(1 + I*c*x)^4*(a + b*ArcTan[c*x]))/(4*c^2) - (d^3*(1 + I*c*x)^5*(a + b*ArcTan[c*x]))/(5*c^2)
+ (((6*I)/5)*b*d^3*Log[I + c*x])/c^2

________________________________________________________________________________________

Rubi [A]  time = 0.0968673, antiderivative size = 157, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, Rules used = {43, 4872, 12, 77} \[ -\frac{d^3 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}+\frac{d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c^2}+\frac{i b d^3 (-c x+i)^4}{20 c^2}-\frac{b d^3 (-c x+i)^3}{20 c^2}-\frac{3 i b d^3 (-c x+i)^2}{20 c^2}+\frac{6 i b d^3 \log (c x+i)}{5 c^2}-\frac{3 b d^3 x}{5 c} \]

Antiderivative was successfully verified.

[In]

Int[x*(d + I*c*d*x)^3*(a + b*ArcTan[c*x]),x]

[Out]

(-3*b*d^3*x)/(5*c) - (((3*I)/20)*b*d^3*(I - c*x)^2)/c^2 - (b*d^3*(I - c*x)^3)/(20*c^2) + ((I/20)*b*d^3*(I - c*
x)^4)/c^2 + (d^3*(1 + I*c*x)^4*(a + b*ArcTan[c*x]))/(4*c^2) - (d^3*(1 + I*c*x)^5*(a + b*ArcTan[c*x]))/(5*c^2)
+ (((6*I)/5)*b*d^3*Log[I + c*x])/c^2

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 4872

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u = I
ntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^2*x^
2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q, 0
]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin{align*} \int x (d+i c d x)^3 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac{d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c^2}-\frac{d^3 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}-(b c) \int \frac{d^3 (i-c x)^3 (-1+4 i c x)}{20 c^2 (i+c x)} \, dx\\ &=\frac{d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c^2}-\frac{d^3 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}-\frac{\left (b d^3\right ) \int \frac{(i-c x)^3 (-1+4 i c x)}{i+c x} \, dx}{20 c}\\ &=\frac{d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c^2}-\frac{d^3 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}-\frac{\left (b d^3\right ) \int \left (12+4 i (i-c x)^3+6 i (-i+c x)-3 (-i+c x)^2-\frac{24 i}{i+c x}\right ) \, dx}{20 c}\\ &=-\frac{3 b d^3 x}{5 c}-\frac{3 i b d^3 (i-c x)^2}{20 c^2}-\frac{b d^3 (i-c x)^3}{20 c^2}+\frac{i b d^3 (i-c x)^4}{20 c^2}+\frac{d^3 (1+i c x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 c^2}-\frac{d^3 (1+i c x)^5 \left (a+b \tan ^{-1}(c x)\right )}{5 c^2}+\frac{6 i b d^3 \log (i+c x)}{5 c^2}\\ \end{align*}

Mathematica [A]  time = 0.100708, size = 132, normalized size = 0.84 \[ \frac{d^3 \left (c x \left (a c x \left (-4 i c^3 x^3-15 c^2 x^2+20 i c x+10\right )+b \left (i c^3 x^3+5 c^2 x^2-12 i c x-25\right )\right )+12 i b \log \left (c^2 x^2+1\right )+b \left (-4 i c^5 x^5-15 c^4 x^4+20 i c^3 x^3+10 c^2 x^2+25\right ) \tan ^{-1}(c x)\right )}{20 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(d + I*c*d*x)^3*(a + b*ArcTan[c*x]),x]

[Out]

(d^3*(c*x*(b*(-25 - (12*I)*c*x + 5*c^2*x^2 + I*c^3*x^3) + a*c*x*(10 + (20*I)*c*x - 15*c^2*x^2 - (4*I)*c^3*x^3)
) + b*(25 + 10*c^2*x^2 + (20*I)*c^3*x^3 - 15*c^4*x^4 - (4*I)*c^5*x^5)*ArcTan[c*x] + (12*I)*b*Log[1 + c^2*x^2])
)/(20*c^2)

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 184, normalized size = 1.2 \begin{align*} -{\frac{i}{5}}{c}^{3}{d}^{3}a{x}^{5}-{\frac{3\,{c}^{2}{d}^{3}a{x}^{4}}{4}}+ic{d}^{3}a{x}^{3}+{\frac{{d}^{3}a{x}^{2}}{2}}-{\frac{i}{5}}{c}^{3}{d}^{3}b\arctan \left ( cx \right ){x}^{5}-{\frac{3\,{c}^{2}{d}^{3}b\arctan \left ( cx \right ){x}^{4}}{4}}+ic{d}^{3}b\arctan \left ( cx \right ){x}^{3}+{\frac{{d}^{3}b\arctan \left ( cx \right ){x}^{2}}{2}}-{\frac{5\,{d}^{3}bx}{4\,c}}+{\frac{i}{20}}{c}^{2}{d}^{3}b{x}^{4}+{\frac{c{d}^{3}b{x}^{3}}{4}}-{\frac{3\,i}{5}}{d}^{3}b{x}^{2}+{\frac{{\frac{3\,i}{5}}{d}^{3}b\ln \left ({c}^{2}{x}^{2}+1 \right ) }{{c}^{2}}}+{\frac{5\,b{d}^{3}\arctan \left ( cx \right ) }{4\,{c}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(d+I*c*d*x)^3*(a+b*arctan(c*x)),x)

[Out]

-1/5*I*c^3*d^3*a*x^5-3/4*c^2*d^3*a*x^4+I*c*d^3*a*x^3+1/2*d^3*a*x^2-1/5*I*c^3*d^3*b*arctan(c*x)*x^5-3/4*c^2*d^3
*b*arctan(c*x)*x^4+I*c*d^3*b*arctan(c*x)*x^3+1/2*d^3*b*arctan(c*x)*x^2-5/4*b*d^3*x/c+1/20*I*c^2*d^3*b*x^4+1/4*
c*d^3*b*x^3-3/5*I*d^3*b*x^2+3/5*I/c^2*d^3*b*ln(c^2*x^2+1)+5/4/c^2*d^3*b*arctan(c*x)

________________________________________________________________________________________

Maxima [A]  time = 1.48549, size = 300, normalized size = 1.91 \begin{align*} -\frac{1}{5} i \, a c^{3} d^{3} x^{5} - \frac{3}{4} \, a c^{2} d^{3} x^{4} - \frac{1}{20} i \,{\left (4 \, x^{5} \arctan \left (c x\right ) - c{\left (\frac{c^{2} x^{4} - 2 \, x^{2}}{c^{4}} + \frac{2 \, \log \left (c^{2} x^{2} + 1\right )}{c^{6}}\right )}\right )} b c^{3} d^{3} + i \, a c d^{3} x^{3} - \frac{1}{4} \,{\left (3 \, x^{4} \arctan \left (c x\right ) - c{\left (\frac{c^{2} x^{3} - 3 \, x}{c^{4}} + \frac{3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b c^{2} d^{3} + \frac{1}{2} i \,{\left (2 \, x^{3} \arctan \left (c x\right ) - c{\left (\frac{x^{2}}{c^{2}} - \frac{\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b c d^{3} + \frac{1}{2} \, a d^{3} x^{2} + \frac{1}{2} \,{\left (x^{2} \arctan \left (c x\right ) - c{\left (\frac{x}{c^{2}} - \frac{\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d^{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)^3*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

-1/5*I*a*c^3*d^3*x^5 - 3/4*a*c^2*d^3*x^4 - 1/20*I*(4*x^5*arctan(c*x) - c*((c^2*x^4 - 2*x^2)/c^4 + 2*log(c^2*x^
2 + 1)/c^6))*b*c^3*d^3 + I*a*c*d^3*x^3 - 1/4*(3*x^4*arctan(c*x) - c*((c^2*x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5))
*b*c^2*d^3 + 1/2*I*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x^2 + 1)/c^4))*b*c*d^3 + 1/2*a*d^3*x^2 + 1/2*(x^2
*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*b*d^3

________________________________________________________________________________________

Fricas [A]  time = 2.76153, size = 404, normalized size = 2.57 \begin{align*} \frac{-8 i \, a c^{5} d^{3} x^{5} - 2 \,{\left (15 \, a - i \, b\right )} c^{4} d^{3} x^{4} +{\left (40 i \, a + 10 \, b\right )} c^{3} d^{3} x^{3} + 4 \,{\left (5 \, a - 6 i \, b\right )} c^{2} d^{3} x^{2} - 50 \, b c d^{3} x + 49 i \, b d^{3} \log \left (\frac{c x + i}{c}\right ) - i \, b d^{3} \log \left (\frac{c x - i}{c}\right ) +{\left (4 \, b c^{5} d^{3} x^{5} - 15 i \, b c^{4} d^{3} x^{4} - 20 \, b c^{3} d^{3} x^{3} + 10 i \, b c^{2} d^{3} x^{2}\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{40 \, c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)^3*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/40*(-8*I*a*c^5*d^3*x^5 - 2*(15*a - I*b)*c^4*d^3*x^4 + (40*I*a + 10*b)*c^3*d^3*x^3 + 4*(5*a - 6*I*b)*c^2*d^3*
x^2 - 50*b*c*d^3*x + 49*I*b*d^3*log((c*x + I)/c) - I*b*d^3*log((c*x - I)/c) + (4*b*c^5*d^3*x^5 - 15*I*b*c^4*d^
3*x^4 - 20*b*c^3*d^3*x^3 + 10*I*b*c^2*d^3*x^2)*log(-(c*x + I)/(c*x - I)))/c^2

________________________________________________________________________________________

Sympy [A]  time = 3.36243, size = 260, normalized size = 1.66 \begin{align*} - \frac{i a c^{3} d^{3} x^{5}}{5} - \frac{5 b d^{3} x}{4 c} - \frac{i b d^{3} \log{\left (x - \frac{i}{c} \right )}}{40 c^{2}} + \frac{49 i b d^{3} \log{\left (x + \frac{i}{c} \right )}}{40 c^{2}} - x^{4} \left (\frac{3 a c^{2} d^{3}}{4} - \frac{i b c^{2} d^{3}}{20}\right ) - x^{3} \left (- i a c d^{3} - \frac{b c d^{3}}{4}\right ) - x^{2} \left (- \frac{a d^{3}}{2} + \frac{3 i b d^{3}}{5}\right ) + \left (- \frac{b c^{3} d^{3} x^{5}}{10} + \frac{3 i b c^{2} d^{3} x^{4}}{8} + \frac{b c d^{3} x^{3}}{2} - \frac{i b d^{3} x^{2}}{4}\right ) \log{\left (i c x + 1 \right )} + \left (\frac{b c^{3} d^{3} x^{5}}{10} - \frac{3 i b c^{2} d^{3} x^{4}}{8} - \frac{b c d^{3} x^{3}}{2} + \frac{i b d^{3} x^{2}}{4}\right ) \log{\left (- i c x + 1 \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)**3*(a+b*atan(c*x)),x)

[Out]

-I*a*c**3*d**3*x**5/5 - 5*b*d**3*x/(4*c) - I*b*d**3*log(x - I/c)/(40*c**2) + 49*I*b*d**3*log(x + I/c)/(40*c**2
) - x**4*(3*a*c**2*d**3/4 - I*b*c**2*d**3/20) - x**3*(-I*a*c*d**3 - b*c*d**3/4) - x**2*(-a*d**3/2 + 3*I*b*d**3
/5) + (-b*c**3*d**3*x**5/10 + 3*I*b*c**2*d**3*x**4/8 + b*c*d**3*x**3/2 - I*b*d**3*x**2/4)*log(I*c*x + 1) + (b*
c**3*d**3*x**5/10 - 3*I*b*c**2*d**3*x**4/8 - b*c*d**3*x**3/2 + I*b*d**3*x**2/4)*log(-I*c*x + 1)

________________________________________________________________________________________

Giac [A]  time = 1.17778, size = 266, normalized size = 1.69 \begin{align*} \frac{8 \, b c^{5} d^{3} x^{5} \arctan \left (c x\right ) + 8 \, a c^{5} d^{3} x^{5} - 30 \, b c^{4} d^{3} i x^{4} \arctan \left (c x\right ) - 30 \, a c^{4} d^{3} i x^{4} - 2 \, b c^{4} d^{3} x^{4} + 10 \, b c^{3} d^{3} i x^{3} - 40 \, b c^{3} d^{3} x^{3} \arctan \left (c x\right ) - 40 \, a c^{3} d^{3} x^{3} + 20 \, b c^{2} d^{3} i x^{2} \arctan \left (c x\right ) + 20 \, a c^{2} d^{3} i x^{2} + 24 \, b c^{2} d^{3} x^{2} - 50 \, b c d^{3} i x - 49 \, b d^{3} \log \left (c i x - 1\right ) + b d^{3} \log \left (-c i x - 1\right )}{40 \, c^{2} i} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(d+I*c*d*x)^3*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

1/40*(8*b*c^5*d^3*x^5*arctan(c*x) + 8*a*c^5*d^3*x^5 - 30*b*c^4*d^3*i*x^4*arctan(c*x) - 30*a*c^4*d^3*i*x^4 - 2*
b*c^4*d^3*x^4 + 10*b*c^3*d^3*i*x^3 - 40*b*c^3*d^3*x^3*arctan(c*x) - 40*a*c^3*d^3*x^3 + 20*b*c^2*d^3*i*x^2*arct
an(c*x) + 20*a*c^2*d^3*i*x^2 + 24*b*c^2*d^3*x^2 - 50*b*c*d^3*i*x - 49*b*d^3*log(c*i*x - 1) + b*d^3*log(-c*i*x
- 1))/(c^2*i)